package com.example.day06;

/**
 *
 * 抽象父类
 */
public abstract class AbstractSup {

        abstract  void print();
        void  show(){
            System.out.println("抽象父类");
        }

    public AbstractSup() {
    }
}
class    Asump extends   AbstractSup{

    @Override
    void print() {
        System.out.println("第一个子类继承了父类的犯法");
    }
}

abstract  class   Bsump  extends  AbstractSup{

}

class   TestA{
    public static void main(String[] args) {
        AbstractSup abstractSup=new Asump();
        abstractSup.show();

        abstractSup.print();

        Bsump bsump=new Bsump() {
            @Override
            void print() {
                System.out.println("匿名内部类。。。。");
            }
        };
        bsump.print();

    }
}

